<!DOCTYPE html>
<html>
<head>
	<title>订单列表</title>
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
	<style type="text/css">
		body { margin: 20 auto 0 auto; }
	</style>
</head>
<body>
<div class="btn-group">
	<a href="/admin_1427a/mall/goods" class="btn btn-default" role="button">所有商品</a>
	<a href="/admin_1427a/mall/order" class="btn btn-default active" role="button">商城订单</a>
	<a href="/admin_1427a/mall/edit" class="btn btn-default" role="button">添加商品</a>
</div>
<table class="table table-bordered">
	<tr>
		<th>订单id</th>
		<th>支付流水号</th>
		<th>用户昵称</th>
		<th>真实姓名</th>
		<th>手机号</th>
		<th>地址</th>
		<th>购买的商品</th>
		<th>备注</th>
	</tr>
	@foreach($list as $order)
		<?php $user = $order->user; ?>
		<tr>
			<td>{{ $order->id }}</td>
			<td>{{ $order->trade_id }}</td>
			<td><a href="/admin_1427a/user?id={{ $user->id }}" target="_blank" >{{ $user->nickname }}</a></td>
			<td>{{ $order->realname }}</td>
			<td>{{ $order->phone }}</td>
			<td>{{ $order->address }}</td>
			<td>
				@foreach($order->items as $item)
					{{$item->goods->name}} <img src="{{ $item->goods->images }}" width="100" /> <br>
				@endforeach
			</td>
			<td>{{ $order->remark }}</td>
		</tr>
	@endforeach
</table>
{{ $list->appends($params)->links() }}
</body>
</html>
